<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>FIRST</title>
		<style type="text/css">
			*{
				padding: 0;
				margin: 0;
			}
			.container{
				width: 100vw;
				height: 100vh;
				display: flex;
				align-items: center;
				justify-content: center;
			}
		canvas{
			width: 400px;
			height: 400px;
			border: 10px solid #333333;
		}	
		
		</style>
	</head>
	<body>
		<div class="container">
		<canvas id="canvas" width="400" height="400"></canvas>
		</div>
	</body>
	<script>
		window.onload = function() {
			let oCanvas = document.getElementById('canvas');
			
			console.dir(oCanvas)
			let oPen=oCanvas.getContext("2d");
			
			//MOVETO
//			oPen.moveTo(200,0);
//			//lineTo
//			oPen.lineTo(0,200);
//			oPen.moveTo(200,0);
//
//			oPen.lineTo(400,200);
//
//			oPen.moveTo(0,200);
//			
//			oPen.lineTo(400,200);
//			
//			oPen.moveTo(100,100);
//			oPen.lineTo(180,150);
//			oPen.lineTo(100,150);
//			oPen.lineTo(100,100);
//			
//			oPen.moveTo(300,100);
//			oPen.lineTo(220,150);
//			oPen.lineTo(300,150);
//			oPen.lineTo(300,100);
//			
//			
			oPen.moveTo(10,210);
			oPen.lineTo(390,210);
			oPen.lineTo(390,390);
			oPen.lineTo(10,390);
			oPen.lineTo(10,210);
			oPen.stroke();
			
//			oPen.strokeStyle="chocolate"
//			oPen.fillStyle="black"
//			oPen.strokeRect(100,300,200,80);
//			oPen.fillRect(100,300,200,80);
//			oPen.clearRect(110,358,180,20);
//			oPen.clearRect(110,302,180,20);
			
//			for(var i=0;1<10;i++){
//				for(var j=0;j<10;j++){
//					oPen.fillStyle="rgb("+(255-(255/10.0)*i)+','+((255/10.0)*i)+',0)';
//					oPen.fillRect(0+(255/10.0)*i,j*25.5,25.5,25.5);
//				}
//			}
//			for (var i=0;i<80;i++){
//				oPen.moveTo(100,300 + i );
//				oPen.lineTo(300,300+i);
//			}
//			oPen.stroke();
			
			
		}
	</script>
</html>
